package ynu.edu.api.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import ynu.edu.api.client.fallback.UserClientFallbackFactory;
import ynu.edu.common.domain.DeductDTO;

import javax.validation.Valid;

@FeignClient(value = "user-service",fallbackFactory = UserClientFallbackFactory.class)
public interface UserClient {
    @PutMapping("/users/money/deduct")
    void deductMoney(@Valid @RequestBody DeductDTO dto);
}